package speed2010.andreza.vspeed.gui;
import java.awt.Component;
import java.awt.Dimension;

import javax.swing.BorderFactory;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.GroupLayout;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.JTextPane;
import javax.swing.LayoutStyle;
import javax.swing.SwingConstants;
import javax.swing.border.BevelBorder;

/**
 * @author <a href="mailto:andreza.lba@gmail.com">Andreza Leite de Alencar</a>
 */
public class PanelFormNewPeer extends javax.swing.JPanel {

	private static final long serialVersionUID = 1L;
	private JPanel jPanelForm;
	private JTextField jTextFieldInstitution;
	private JComboBox jComboBoxDomain;
	private JTextPane jTextPane1;
	private JPanel jPanelFormulario;
	private JTextField jTextFieldEmail;
	private JTextField jTextField4;
	private JTextField jTextField3;
	private JTextField jTextField2;
	private JTextField jTextField1;
	private JTextField jTextFieldInformDomain;
	private JButton jButtonOWL;
	private JButton jButtonSubmit;
	private JTextField jTextFieldMsg;

	public PanelFormNewPeer() {
		super();
		initGUI();
	}

	private void initGUI() {
		try {
			final GroupLayout thisLayout = new GroupLayout(this);
			setLayout(thisLayout);
			setPreferredSize(new Dimension(1024, 768));
			setBackground(new java.awt.Color(255, 255, 255));
			setOpaque(false);
			{
				this.jPanelForm = new JPanel();
				final GroupLayout jPanelFormLayout = new GroupLayout(this.jPanelForm);
				this.jPanelForm.setLayout(jPanelFormLayout);
				this.jPanelForm.setBackground(new java.awt.Color(255, 255, 255));
				this.jPanelForm.setBorder(BorderFactory.createTitledBorder("Want to be a member?"));
				{
					this.jTextFieldMsg = new JTextField();
					this.jTextFieldMsg.setText("Fill the form below!");
					this.jTextFieldMsg.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
					this.jTextFieldMsg.setEditable(false);
					this.jTextFieldMsg.setOpaque(false);
				}
				{
					this.jPanelFormulario = new JPanel();
					final GroupLayout jPanelFormularioLayout = new GroupLayout(this.jPanelFormulario);
					this.jPanelFormulario.setLayout(jPanelFormularioLayout);
					this.jPanelFormulario.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
					{
						this.jTextPane1 = new JTextPane();
						this.jTextPane1.setText("Ontology.owl");
						this.jTextPane1.setEditable(false);
						this.jTextPane1.setEnabled(false);
						this.jTextPane1.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
					}
					{
						final ComboBoxModel jComboBoxDomainModel = new DefaultComboBoxModel(new String[]{"Select",
								"Education"});
						this.jComboBoxDomain = new JComboBox();
						this.jComboBoxDomain.setModel(jComboBoxDomainModel);
					}
					{
						this.jTextFieldInstitution = new JTextField();
					}
					{
						this.jTextFieldEmail = new JTextField();
					}
					{
						this.jButtonSubmit = new JButton();
						this.jButtonSubmit.setText("Submit");
						this.jButtonSubmit.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
					}
					{
						this.jButtonOWL = new JButton();
						this.jButtonOWL.setText("Choose OWL file");
					}
					{
						this.jTextFieldInformDomain = new JTextField();
						this.jTextFieldInformDomain.setText("Inform a new one");
						this.jTextFieldInformDomain.setOpaque(false);
						this.jTextFieldInformDomain.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
						this.jTextFieldInformDomain.setEditable(false);
					}
					{
						this.jTextField1 = new JTextField();
						this.jTextField1.setText("Upload your schema:");
						this.jTextField1.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
						this.jTextField1.setBackground(new java.awt.Color(255, 255, 255));
						this.jTextField1.setEditable(false);
						this.jTextField1.setOpaque(false);
					}
					{
						this.jTextField2 = new JTextField();
						this.jTextField2.setText("Select a existing domain:");
						this.jTextField2.setEditable(false);
						this.jTextField2.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
						this.jTextField2.setOpaque(false);
					}
					{
						this.jTextField3 = new JTextField();
						this.jTextField3.setText("Institution:");
						this.jTextField3.setEditable(false);
						this.jTextField3.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
						this.jTextField3.setOpaque(false);
					}
					{
						this.jTextField4 = new JTextField();
						this.jTextField4.setText("E-mail:");
						this.jTextField4.setEditable(false);
						this.jTextField4.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
						this.jTextField4.setOpaque(false);
					}
					jPanelFormularioLayout.setHorizontalGroup(jPanelFormularioLayout
							.createSequentialGroup()
							.addContainerGap(134, Short.MAX_VALUE)
							.addGroup(
									jPanelFormularioLayout
											.createParallelGroup()
											.addComponent(this.jTextField1, GroupLayout.Alignment.LEADING,
													GroupLayout.PREFERRED_SIZE, 151, GroupLayout.PREFERRED_SIZE)
											.addComponent(this.jTextField2, GroupLayout.Alignment.LEADING,
													GroupLayout.PREFERRED_SIZE, 151, GroupLayout.PREFERRED_SIZE)
											.addComponent(this.jTextField3, GroupLayout.Alignment.LEADING,
													GroupLayout.PREFERRED_SIZE, 151, GroupLayout.PREFERRED_SIZE)
											.addComponent(this.jTextField4, GroupLayout.Alignment.LEADING,
													GroupLayout.PREFERRED_SIZE, 151, GroupLayout.PREFERRED_SIZE))
							.addGroup(
									jPanelFormularioLayout
											.createParallelGroup()
											.addComponent(this.jTextPane1, GroupLayout.Alignment.LEADING,
													GroupLayout.PREFERRED_SIZE, 207, GroupLayout.PREFERRED_SIZE)
											.addComponent(this.jComboBoxDomain, GroupLayout.Alignment.LEADING,
													GroupLayout.PREFERRED_SIZE, 207, GroupLayout.PREFERRED_SIZE)
											.addComponent(this.jTextFieldInstitution, GroupLayout.Alignment.LEADING,
													GroupLayout.PREFERRED_SIZE, 207, GroupLayout.PREFERRED_SIZE)
											.addComponent(this.jTextFieldEmail, GroupLayout.Alignment.LEADING,
													GroupLayout.PREFERRED_SIZE, 207, GroupLayout.PREFERRED_SIZE)
											.addGroup(
													GroupLayout.Alignment.LEADING,
													jPanelFormularioLayout
															.createSequentialGroup()
															.addGap(0, 102, GroupLayout.PREFERRED_SIZE)
															.addComponent(this.jButtonSubmit,
																	GroupLayout.PREFERRED_SIZE, 105,
																	GroupLayout.PREFERRED_SIZE)))
							.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
							.addGroup(
									jPanelFormularioLayout
											.createParallelGroup()
											.addGroup(
													GroupLayout.Alignment.LEADING,
													jPanelFormularioLayout
															.createSequentialGroup()
															.addComponent(this.jButtonOWL, GroupLayout.PREFERRED_SIZE,
																	113, GroupLayout.PREFERRED_SIZE).addGap(23))
											.addComponent(this.jTextFieldInformDomain, GroupLayout.Alignment.LEADING,
													GroupLayout.PREFERRED_SIZE, 136, GroupLayout.PREFERRED_SIZE)));
					jPanelFormularioLayout.linkSize(SwingConstants.HORIZONTAL, new Component[]{this.jTextFieldEmail,
							this.jTextFieldInstitution, this.jComboBoxDomain, this.jTextPane1});
					jPanelFormularioLayout.linkSize(SwingConstants.HORIZONTAL, new Component[]{this.jTextField4,
							this.jTextField3, this.jTextField2, this.jTextField1});
					jPanelFormularioLayout.setVerticalGroup(jPanelFormularioLayout
							.createSequentialGroup()
							.addContainerGap(38, 38)
							.addGroup(
									jPanelFormularioLayout
											.createParallelGroup()
											.addGroup(
													GroupLayout.Alignment.LEADING,
													jPanelFormularioLayout
															.createParallelGroup(GroupLayout.Alignment.BASELINE)
															.addComponent(this.jButtonOWL,
																	GroupLayout.Alignment.BASELINE,
																	GroupLayout.PREFERRED_SIZE, 28,
																	GroupLayout.PREFERRED_SIZE)
															.addComponent(this.jTextField1,
																	GroupLayout.Alignment.BASELINE,
																	GroupLayout.PREFERRED_SIZE, 28,
																	GroupLayout.PREFERRED_SIZE))
											.addComponent(this.jTextPane1, GroupLayout.Alignment.LEADING, 0, 29,
													Short.MAX_VALUE))
							.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
							.addGroup(
									jPanelFormularioLayout
											.createParallelGroup(GroupLayout.Alignment.BASELINE)
											.addComponent(this.jTextField2, GroupLayout.Alignment.BASELINE,
													GroupLayout.PREFERRED_SIZE, 28, GroupLayout.PREFERRED_SIZE)
											.addComponent(this.jTextFieldInformDomain, GroupLayout.Alignment.BASELINE,
													GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
											.addComponent(this.jComboBoxDomain, GroupLayout.Alignment.BASELINE,
													GroupLayout.PREFERRED_SIZE, 29, GroupLayout.PREFERRED_SIZE))
							.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
							.addGroup(
									jPanelFormularioLayout
											.createParallelGroup(GroupLayout.Alignment.BASELINE)
											.addComponent(this.jTextFieldInstitution, GroupLayout.Alignment.BASELINE,
													GroupLayout.PREFERRED_SIZE, 29, GroupLayout.PREFERRED_SIZE)
											.addComponent(this.jTextField3, GroupLayout.Alignment.BASELINE,
													GroupLayout.PREFERRED_SIZE, 28, GroupLayout.PREFERRED_SIZE))
							.addGap(22)
							.addGroup(
									jPanelFormularioLayout
											.createParallelGroup(GroupLayout.Alignment.BASELINE)
											.addComponent(this.jTextFieldEmail, GroupLayout.Alignment.BASELINE,
													GroupLayout.PREFERRED_SIZE, 29, GroupLayout.PREFERRED_SIZE)
											.addComponent(this.jTextField4, GroupLayout.Alignment.BASELINE,
													GroupLayout.PREFERRED_SIZE, 28, GroupLayout.PREFERRED_SIZE))
							.addGap(57)
							.addComponent(this.jButtonSubmit, GroupLayout.PREFERRED_SIZE, 43,
									GroupLayout.PREFERRED_SIZE).addContainerGap(95, 95));
					jPanelFormularioLayout.linkSize(SwingConstants.VERTICAL, new Component[]{this.jTextFieldEmail,
							this.jTextFieldInstitution, this.jComboBoxDomain, this.jTextPane1});
					jPanelFormularioLayout.linkSize(SwingConstants.VERTICAL, new Component[]{this.jTextField4,
							this.jTextField3, this.jTextField2, this.jTextField1});
				}
				jPanelFormLayout.setHorizontalGroup(jPanelFormLayout
						.createSequentialGroup()
						.addContainerGap(60, 60)
						.addGroup(
								jPanelFormLayout
										.createParallelGroup()
										.addGroup(
												GroupLayout.Alignment.LEADING,
												jPanelFormLayout.createSequentialGroup()
														.addComponent(this.jTextFieldMsg, 0, 152, Short.MAX_VALUE)
														.addGap(0, 374, GroupLayout.PREFERRED_SIZE))
										.addGroup(
												GroupLayout.Alignment.LEADING,
												jPanelFormLayout.createSequentialGroup().addGap(76)
														.addComponent(this.jPanelFormulario, 0, 644, Short.MAX_VALUE)))
						.addContainerGap(158, 158));
				jPanelFormLayout.setVerticalGroup(jPanelFormLayout
						.createSequentialGroup()
						.addGap(19, 19, GroupLayout.PREFERRED_SIZE)
						.addComponent(this.jTextFieldMsg, GroupLayout.PREFERRED_SIZE, 37, GroupLayout.PREFERRED_SIZE)
						.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 32, GroupLayout.PREFERRED_SIZE)
						.addComponent(this.jPanelFormulario, GroupLayout.PREFERRED_SIZE, 398,
								GroupLayout.PREFERRED_SIZE).addContainerGap(153, Short.MAX_VALUE));
			}
			thisLayout.setVerticalGroup(thisLayout.createSequentialGroup().addContainerGap(72, 72)
					.addComponent(this.jPanelForm, GroupLayout.PREFERRED_SIZE, 670, GroupLayout.PREFERRED_SIZE)
					.addContainerGap(26, Short.MAX_VALUE));
			thisLayout.setHorizontalGroup(thisLayout.createSequentialGroup().addContainerGap(37, 37)
					.addComponent(this.jPanelForm, 0, 948, Short.MAX_VALUE).addContainerGap(39, 39));
		} catch (final Exception e) {
			e.printStackTrace();
		}
	}

	public JButton getJButtonOWL() {
		return this.jButtonOWL;
	}

}
